<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>AdWords API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="../css/template.css" type="text/css"></link></head><body><div id="content"><h1 class="file">Common/Lib/SoapClientFactory.php</h1><div id="file-nav-box"><div id="file-nav-container"><ul id="file-nav"><li><a href="#classes"><img src="../images/icons/class.png" alt="Class" height="14"></img>
                          Classes
                      </a><ul><li><a href="#\SoapClientFactory">\SoapClientFactory</a></li></ul></li></ul><div style="clear: left;"></div></div><div id="file-nav-tab">
              Table of Contents
          </div></div><a name="top" class="anchor"></a><div id="file-description"><div class="short-description">Base class for all SOAP client factories of Ads client libraries.</div><div class="long-description"><p>PHP version 5</p>

<p>Copyright 2011, Google Inc. All Rights Reserved.</p>

<p>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at</p>

<pre><code>http://www.apache.org/licenses/LICENSE-2.0
</code></pre>

<p>Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</p></div></div><dl class="file-info"><dt>Author</dt><dd>Adam Rogal
         
    </dd><dt>Author</dt><dd>Eric Koleda
         
    </dd><dt>Author</dt><dd>Vincent Tsao
         
    </dd><dt>Category</dt><dd>WebServices
         
    </dd><dt>Copyright</dt><dd>2011, Google Inc. All Rights Reserved.
         
    </dd><dt>License</dt><dd>http://www.apache.org/licenses/LICENSE-2.0 Apache License,
            Version 2.0
         
    </dd><dt>Package</dt><dd>GoogleApiAdsCommon
         
    </dd><dt>Subpackage</dt><dd>Lib
         
    </dd></dl><a name="classes" class="anchor"></a><a id="\SoapClientFactory" class="anchor"></a><h2 class="class">\SoapClientFactory<div class="to-top"><a href="#top">jump to top</a></div></h2><div class="class"><small class="package"><b>Package: </b>GoogleApiAdsCommon\Lib</small><div class="short-description">Base class for all SOAP client factories of Ads client libraries.</div><div class="long-description"></div><dl class="class-info"><dt>Children</dt><dd><a href="../files/AdWords.Lib.AdWordsSoapClientFactory.html#\AdWordsSoapClientFactory">\AdWordsSoapClientFactory</a></dd></dl><h3>Properties</h3><div><a id="\SoapClientFactory::$COMPRESSION_KIND" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">$COMPRESSION_KIND</span></code><div class="description"><span class="attribute">static</span></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$SERVER_REGEX" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$SERVER_REGEX</span> = '/^\w*:\/\/[^\/]*/'</code><div class="description"><span class="attribute">static</span></div><div class="code-tabs"><strong>Default value</strong><code>'/^\w*:\/\/[^\/]*/'</code><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$headerOverrides" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$headerOverrides</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$productName" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$productName</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$server" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$server</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$user" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$user</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::$version" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$version</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div></div><h3>Methods</h3><div><a id="\SoapClientFactory::DoRequireOnce()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">DoRequireOnce</span><span class="nb-faded-text">(string $serviceName)</span> : void</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Initiates a require_once for the service.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$serviceName</th><td>string</td><td><em><p>the service to instantiate</p></em></td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GenerateServiceClient()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GenerateServiceClient</span><span class="nb-faded-text">(string $serviceName)</span> : <a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></code><div class="description"><p class="short_description">Generates the SOAP service client without the proper headers set yet.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$serviceName</th><td>string</td><td><em><p>the service to create a client for</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></td><td>the SOAP service client</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::GenerateSoapClient()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GenerateSoapClient</span><span class="nb-faded-text">(string $serviceName)</span> : <a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></code><div class="description"><p class="short_description">Generates a SOAP client for the given service name.</p></div><div class="code-tabs"><div class="long-description"><p>Generates a user level
error if this instalation of PHP does not have the extension for SOAP
installed.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$serviceName</th><td>string</td><td><em><p>the name of the service to generate a client for</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></td><td>an instantiated SOAP client</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GetAdsUser()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetAdsUser</span><span class="nb-faded-text">()</span> : <a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></code><div class="description"><p class="short_description">Gets the user associated with this factory.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></td><td>the user associated with this factory</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GetCompressionKind()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetCompressionKind</span><span class="nb-faded-text">()</span> : int</code><div class="description"><span class="attribute">static</span><p class="short_description">Get the compression flag</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>int</td><td>Get the compression flag value</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GetProductName()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetProductName</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the product name associated with this factory.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the product name associated with this factory</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GetServer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetServer</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the server associated with this factory.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the server associated with this factory</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::GetServiceLocation()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetServiceLocation</span><span class="nb-faded-text">(string $serviceName)</span> : string</code><div class="description"><p class="short_description">Gets the end-point location of the service.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$serviceName</th><td>string</td><td><em><p>the service to instantiate</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the end-point location of the service.</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\SoapClientFactory::GetVersion()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetVersion</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the version associated with this factory.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the version associated with this factory</td></tr></table></div><div class="clear"></div></div><a id="\SoapClientFactory::__construct()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">__construct</span><span class="nb-faded-text">(<a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a> $user, string $version, string $server, string $productName,  $headerOverrides = NULL)</span> : void</code><div class="description"><p class="short_description">The constructor called by any sub-class.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$user</th><td><a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></td><td><em><p>the user which the client will use for credentials</p></em></td></tr><tr><th>$version</th><td>string</td><td><em><p>the version to generate clients for</p></em></td></tr><tr><th>$server</th><td>string</td><td><em><p>the server to generate clients for</p></em></td></tr><tr><th>$productName</th><td>string</td><td><em><p>the product name (i.e. adwords)</p>
</em></td></tr><tr><th>$headerOverrides</th><td></td><td><em></em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div></div></div></div><small class="footer">
            Documentation was generated by
            <a href="http://phpdoc.org">phpDocumentor
                2.0.0a12</a>.
        </small></body></html>
